<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="div1">
    <a href="#">a1</a>
    <a href="#">a2</a>
    <a href="#">a3</a>
    <a href="#">a4</a>
    <a href="#">a5</a>
  </div>

  <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>

  <script>
    //自定义回调
    var callbacks = $.Callbacks()
    callbacks.add(function (info) {
      console.log('fn1', info)
    })
    callbacks.add(function (info) {
      console.log('fn2', info)
    })
    callbacks.add(function (info) {
      console.log('fn3', info)
    })
    callbacks.fire('gogogo')
    callbacks.fire('fire')
  </script>
</body>

</html>